import * as TYPES from './actionTypes'
const intialState = {
  searchLIst: {},
  isHeaderSearch:false,
  isCanSearch: true,
}

const reducer = function (state = intialState, action) {
  switch (action.type) {
    case TYPES.TYPE_GYS:
      return Object.assign({}, state, {
        searchLIst: action.searchLIst,
      })
    case TYPES.TYPE_CANSEARCH:
      return Object.assign({}, state, {
        isCanSearch: action.isCanSearch
      })
    case TYPES.TYPE_ISHEADERSEARCH:
    return Object.assign({}, state, {
      isHeaderSearch: action.isHeaderSearch
    })
   
    default:
      return state
  }
}
export default reducer